package kr.hkit.powerjava.chapter12;

public class Rectangle extends Shape {
	private int width;
	private int height;
	
	@Override
	public void draw() {
		System.out.println("사각형 그리기 메소드");
	}
	
	public static void main(String[] args) {
		Shape[] arrShape = new Shape[2];
		arrShape[0] = new Rectangle();
		arrShape[1] = new Triangle();
		
		for(Shape sh : arrShape) {
			sh.draw();
		}
	}
}

class Triangle extends Shape {

	@Override
	public void draw() {
		System.out.println("삼각형을 그림");
		
	}
	
}
